﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NPMonitor.Web.Handler
{
    public class ClickOnceHandler : IHttpHandler
    {
        public bool IsReusable
        {
            get { return false; }
        }

        public void ProcessRequest(HttpContext context)
        {
            context.Response.AddHeader("Content-Type", "application/x-ms-application");

            string filePath = context.Request.FilePath;
            filePath = context.Request.MapPath("/Publish/NPMonitor.Launcher.application");
            context.Response.TransmitFile(filePath);
        }
    }
}